package io.dbw.modules.business.controller.sys;

import io.dbw.common.utils.PageUtils;
import io.dbw.common.utils.Result;
import io.dbw.modules.business.entity.SysLogEntity;
import io.dbw.modules.business.service.SysLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.Map;


/**
 * 系统日志
 *
 * 
 */
@ApiIgnore
@RestController
@RequestMapping("/sys/log")
@Api(tags = "日志管理")
public class SysLogController extends AbstractController{
	@Autowired
	private SysLogService sysLogService;
	
	/**
	 * 列表
	 */
	@ResponseBody
	@GetMapping("/list")
	@ApiOperation(value="列表查询")
	@ApiImplicitParams({
		@ApiImplicitParam(paramType = "query",name = "pageNo",value ="第几页",dataType ="int",required = true),
		@ApiImplicitParam(paramType = "query",name = "pageSize",value ="每页条数",dataType ="int",required = true)
	})
	public Result<PageUtils<SysLogEntity>> list(@ApiIgnore @RequestParam Map<String, Object> params){
		PageUtils page = sysLogService.queryPage(params);
		return writeSuccess(page);
	}
	
}
